//
//  XSAVPlayerDelegate.h
//  AudioVideo
//
//  Created by xueshan1 on 2019/8/23.
//  Copyright © 2019 xueshan1. All rights reserved.
//

typedef NS_ENUM(NSUInteger,XSAVPlayerState){
    XSAVPlayerState_Stopped =100,
    XSAVPlayerState_ReadyPlay,
    XSAVPlayerState_Playing,
    XSAVPlayerState_Pause,
    XSAVPlayerState_Failed,
    XSAVPlayerState_Buffering
    
};

@class XSAVPlayer;
@protocol IXSAVPlayerDelegate <NSObject>

//播放进度
- (void)sf_player:(XSAVPlayer *)player progress:(CGFloat)progress currentTime:(CGFloat)currentTime totalTime:(CGFloat)totalTime;

//缓冲进度
- (void)sf_player:(XSAVPlayer *)player bufferProgress:(CGFloat)bufferProgress totalTime:(CGFloat)totalTime;

//播放结束
- (void)sf_playerDidPlayToEndTime:(XSAVPlayer *)player;

//播放失败
- (void)sf_playerPlayFailed:(NSString *)errMsg;

//播放状态
- (void)sf_playerPlayState:(XSAVPlayerState)playState;

@end
